<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Array 2</title>
</head>
<body>
    <button onclick="displayArray()">插入</button>
    <p id="output"></p>
</body>
</html>
    <script>
        // 点击后在原有数组后插入新的数组
        const array = [1, 2, 3, 4, 5];
        const output = document.getElementById('output');
        output.innerHTML = 'Array: ' + array.join(', ');
        function displayArray() {
            array.push(6,7,8,9,10);
            output.innerHTML = 'Array: ' + array.join(', ');
        }
    </script>